﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZSZ.DTO;
using ZSZ.Model;

namespace ZSZ.IService
{
    public partial interface IHouseAppointmentService : IBaseService<HouseAppointment>
    {
        HouseAppointmentDTO[] GetPagedData(long cityId,string status, out long total, int pageIndex, int pageSize);

        //新增一个预约：userId用户id（可以为null，表示匿名用户）；name姓名、phoneNum手机号、houseId房间id、visiteDate预约看房时间
        long AddNew(long? userId, String name, String phoneNum, long houseId, DateTime visitDate);

        bool Follow(long adminUserId, long houseAppointmentId); //使用乐观锁解决并发的问题（这里先不实现，先抛个异常，后面再做）
    }
}
